package com.yanqu.road.entity.activity.shushan;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.DataStatus;

import java.util.HashMap;
import java.util.Map;

/**
 * @Description
 * @Author cwq
 * @Data 2022/3/8 16:31
 */
@FieldTypeAnnotation(tableName = "t_u_activity_shushan_disciple_data")
public class ShuShanDiscipleData extends DataObject {
    @FieldTypeAnnotation(desc = "活动ID", select = true, update = true)
    private int activityId;
    @FieldTypeAnnotation(desc = "用户ID", select = true, update = true)
    private long userId;
    @FieldTypeAnnotation(desc = "弟子", select = true, update = true)
    private int id;
    @FieldTypeAnnotation(desc = "名字")
    private String name;
    @FieldTypeAnnotation(desc = "品级")
    private int quality;
    @FieldTypeAnnotation(desc = "上次学习结束时间")
    private int lastLearnedTime;
    @FieldTypeAnnotation(desc = "招收时间")
    private int getTime;
    @FieldTypeAnnotation(desc = "是否删除")
    private boolean isDelete;
    @FieldTypeAnnotation(desc = "属性")
    private Map<Integer,ShuShanPropertiesInfo> propertiesInfoMap = new HashMap<>();
    @FieldTypeAnnotation(desc = "每个建筑 每个技能 已学到的最高级 k:建筑类型 k: 技能小类， 技能等级")
    private Map<Integer, Map<Integer, Integer>> learnedSkillMap = new HashMap<>();

    public int getActivityId() {
        return activityId;
    }
    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }
    }

    public long getUserId() {
        return userId;
    }
    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setOp(DataStatus.Update);
        }
    }

    public int getId() {
        return id;
    }
    public void setId(int id) {
        if (this.id != id) {
            this.id = id;
            setOp(DataStatus.Update);
        }
    }

    public String getName() {
        return name;
    }
    public void setName(String name) {
        if (name == null){
            return;
        }
        if (this.name == null || !this.name.equals(name)) {
            this.name = name;
            setOp(DataStatus.Update);
        }
    }

    public int getQuality() {
        return quality;
    }
    public void setQuality(int quality) {
        if (this.quality != quality) {
            this.quality = quality;
            setOp(DataStatus.Update);
        }
    }

    public int getLastLearnedTime() {
        return lastLearnedTime;
    }
    public void setLastLearnedTime(int lastLearnedTime) {
        if (this.lastLearnedTime != lastLearnedTime) {
            this.lastLearnedTime = lastLearnedTime;
            setOp(DataStatus.Update);
        }
    }

    public int getGetTime() {
        return getTime;
    }
    public void setGetTime(int getTime) {
        if (this.getTime != getTime) {
            this.getTime = getTime;
            setOp(DataStatus.Update);
        }
    }

    public boolean getIsDelete() {
        return isDelete;
    }
    public void setIsDelete(boolean isDelete) {
        if (this.isDelete != isDelete) {
            this.isDelete = isDelete;
            setOp(DataStatus.Update);
        }
    }

    public java.util.Map<java.lang.Integer, com.yanqu.road.entity.activity.shushan.ShuShanPropertiesInfo> getPropertiesInfoMap() {
        return propertiesInfoMap;
    }
    public void setPropertiesInfoMap(java.util.Map<java.lang.Integer, com.yanqu.road.entity.activity.shushan.ShuShanPropertiesInfo> propertiesInfoMap) {
        if (null == propertiesInfoMap){
            return;
        }
        if (this.propertiesInfoMap == null || !this.propertiesInfoMap.equals(propertiesInfoMap)) {
            this.propertiesInfoMap = propertiesInfoMap;
            setOp(DataStatus.Update);
        }
    }

    public java.util.Map<java.lang.Integer, Map<Integer, Integer>> getLearnedSkillMap() {
        return learnedSkillMap;
    }
    public void setLearnedSkillMap(java.util.Map<java.lang.Integer, Map<Integer, Integer>> learnedSkillMap) {
        if (null == learnedSkillMap){
            return;
        }
        if (this.learnedSkillMap == null || !this.learnedSkillMap.equals(learnedSkillMap)) {
            this.learnedSkillMap = learnedSkillMap;
            setOp(DataStatus.Update);
        }
    }
}
